package com.xmfh.wemedia.controller;

import com.xmfh.wemedia.service.IDdCommentService;
import com.xmfh.wemedia.util.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther:
 * @Date: 2022/4/8 22:17
 * @Description: com.xmfh.wemedia.controller
 * @version: 1.0
 */
@RestController
@RequestMapping("/wemedia/comment")
public class DdCommentController {
    @Autowired
    private IDdCommentService commentService;

    @RequestMapping("/{type}/commentPlusOne/{id}")
    public JsonResult<Void> CommentPlusOne(@PathVariable String type, @PathVariable Integer id) {
        commentService.addCommentCount(type, id);
        return JsonResult.ok();
    }
}
